Integrand size = 16, antiderivative size = 169 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}+\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b} \]
c*d*x/b+1/2*d^2*x^2/b-1/3*I*(d*x+c)^3/d+(d*x+c)^2*ln(1+exp(2*I*(b*x+a)))/b -d^2*ln(cos(b*x+a))/b^3-I*d*(d*x+c)*polylog(2,-exp(2*I*(b*x+a)))/b^2+1/2*d ^2*polylog(3,-exp(2*I*(b*x+a)))/b^3-d*(d*x+c)*tan(b*x+a)/b^2+1/2*(d*x+c)^2 *tan(b*x+a)^2/b
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(454\) vs. \(2(169)=338\).
Time = 6.74 (sec) , antiderivative size = 454, normalized size of antiderivative = 2.69 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {i d^2 e^{-i a} \left (2 b^2 x^2 \left (2 b x-3 i \left (1+e^{2 i a}\right ) \log \left (1+e^{-2 i (a+b x)}\right )\right )+6 b \left (1+e^{2 i a}\right ) x \operatorname {PolyLog}\left (2,-e^{-2 i (a+b x)}\right )-3 i \left (1+e^{2 i a}\right ) \operatorname {PolyLog}\left (3,-e^{-2 i (a+b x)}\right )\right ) \sec (a)}{12 b^3}+\frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}+\frac {c^2 \sec (a) (\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x))+b x \sin (a))}{b \left (\cos ^2(a)+\sin ^2(a)\right )}-\frac {d^2 \sec (a) (\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x))+b x \sin (a))}{b^3 \left (\cos ^2(a)+\sin ^2(a)\right )}+\frac {c d \csc (a) \left (b^2 e^{-i \arctan (\cot (a))} x^2-\frac {\cot (a) \left (i b x (-\pi -2 \arctan (\cot (a)))-\pi \log \left (1+e^{-2 i b x}\right )-2 (b x-\arctan (\cot (a))) \log \left (1-e^{2 i (b x-\arctan (\cot (a)))}\right )+\pi \log (\cos (b x))-2 \arctan (\cot (a)) \log (\sin (b x-\arctan (\cot (a))))+i \operatorname {PolyLog}\left (2,e^{2 i (b x-\arctan (\cot (a)))}\right )\right )}{\sqrt {1+\cot ^2(a)}}\right ) \sec (a)}{b^2 \sqrt {\csc ^2(a) \left (\cos ^2(a)+\sin ^2(a)\right )}}+\frac {\sec (a) \sec (a+b x) \left (-c d \sin (b x)-d^2 x \sin (b x)\right )}{b^2}-\frac {1}{3} x \left (3 c^2+3 c d x+d^2 x^2\right ) \tan (a) \]
((I/12)*d^2*(2*b^2*x^2*(2*b*x - (3*I)*(1 + E^((2*I)*a))*Log[1 + E^((-2*I)* (a + b*x))]) + 6*b*(1 + E^((2*I)*a))*x*PolyLog[2, -E^((-2*I)*(a + b*x))] - (3*I)*(1 + E^((2*I)*a))*PolyLog[3, -E^((-2*I)*(a + b*x))])*Sec[a])/(b^3*E ^(I*a)) + ((c + d*x)^2*Sec[a + b*x]^2)/(2*b) + (c^2*Sec[a]*(Cos[a]*Log[Cos [a]*Cos[b*x] - Sin[a]*Sin[b*x]] + b*x*Sin[a]))/(b*(Cos[a]^2 + Sin[a]^2)) - (d^2*Sec[a]*(Cos[a]*Log[Cos[a]*Cos[b*x] - Sin[a]*Sin[b*x]] + b*x*Sin[a])) /(b^3*(Cos[a]^2 + Sin[a]^2)) + (c*d*Csc[a]*((b^2*x^2)/E^(I*ArcTan[Cot[a]]) - (Cot[a]*(I*b*x*(-Pi - 2*ArcTan[Cot[a]]) - Pi*Log[1 + E^((-2*I)*b*x)] - 2*(b*x - ArcTan[Cot[a]])*Log[1 - E^((2*I)*(b*x - ArcTan[Cot[a]]))] + Pi*Lo g[Cos[b*x]] - 2*ArcTan[Cot[a]]*Log[Sin[b*x - ArcTan[Cot[a]]]] + I*PolyLog[ 2, E^((2*I)*(b*x - ArcTan[Cot[a]]))]))/Sqrt[1 + Cot[a]^2])*Sec[a])/(b^2*Sq rt[Csc[a]^2*(Cos[a]^2 + Sin[a]^2)]) + (Sec[a]*Sec[a + b*x]*(-(c*d*Sin[b*x] ) - d^2*x*Sin[b*x]))/b^2 - (x*(3*c^2 + 3*c*d*x + d^2*x^2)*Tan[a])/3
Time = 0.92 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.08, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {3042, 4203, 3042, 4202, 2620, 3011, 2720, 4203, 17, 3042, 3956, 7143}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x)^2 \tan ^3(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^2 \tan (a+b x)^3dx\) |
\(\Big \downarrow \) 4203 |
\(\displaystyle -\frac {d \int (c+d x) \tan ^2(a+b x)dx}{b}-\int (c+d x)^2 \tan (a+b x)dx+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int (c+d x)^2 \tan (a+b x)dx-\frac {d \int (c+d x) \tan (a+b x)^2dx}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 4202 |
\(\displaystyle 2 i \int \frac {e^{2 i (a+b x)} (c+d x)^2}{1+e^{2 i (a+b x)}}dx-\frac {d \int (c+d x) \tan (a+b x)^2dx}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle 2 i \left (\frac {i d \int (c+d x) \log \left (1+e^{2 i (a+b x)}\right )dx}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \int (c+d x) \tan (a+b x)^2dx}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {i d \int \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )dx}{2 b}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \int (c+d x) \tan (a+b x)^2dx}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {d \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \int (c+d x) \tan (a+b x)^2dx}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 4203 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {d \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \left (-\frac {d \int \tan (a+b x)dx}{b}-\int (c+d x)dx+\frac {(c+d x) \tan (a+b x)}{b}\right )}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {d \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \left (-\frac {d \int \tan (a+b x)dx}{b}+\frac {(c+d x) \tan (a+b x)}{b}-\frac {(c+d x)^2}{2 d}\right )}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {d \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \left (-\frac {d \int \tan (a+b x)dx}{b}+\frac {(c+d x) \tan (a+b x)}{b}-\frac {(c+d x)^2}{2 d}\right )}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {d \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \left (\frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}-\frac {(c+d x)^2}{2 d}\right )}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle 2 i \left (\frac {i d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b}-\frac {d \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{4 b^2}\right )}{b}-\frac {i (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )-\frac {d \left (\frac {d \log (\cos (a+b x))}{b^2}+\frac {(c+d x) \tan (a+b x)}{b}-\frac {(c+d x)^2}{2 d}\right )}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {i (c+d x)^3}{3 d}\) |
((-1/3*I)*(c + d*x)^3)/d + (2*I)*(((-1/2*I)*(c + d*x)^2*Log[1 + E^((2*I)*( a + b*x))])/b + (I*d*(((I/2)*(c + d*x)*PolyLog[2, -E^((2*I)*(a + b*x))])/b - (d*PolyLog[3, -E^((2*I)*(a + b*x))])/(4*b^2)))/b) + ((c + d*x)^2*Tan[a + b*x]^2)/(2*b) - (d*(-1/2*(c + d*x)^2/d + (d*Log[Cos[a + b*x]])/b^2 + ((c + d*x)*Tan[a + b*x])/b))/b
3.4.5.3.1 Defintions of rubi rules used
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[I *((c + d*x)^(m + 1)/(d*(m + 1))), x] - Simp[2*I Int[(c + d*x)^m*(E^(2*I*( e + f*x))/(1 + E^(2*I*(e + f*x)))), x], x] /; FreeQ[{c, d, e, f}, x] && IGt Q[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symb ol] :> Simp[b*(c + d*x)^m*((b*Tan[e + f*x])^(n - 1)/(f*(n - 1))), x] + (-Si mp[b*d*(m/(f*(n - 1))) Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1), x] , x] - Simp[b^2 Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; Free Q[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 408 vs. \(2 (153 ) = 306\).
Time = 0.70 (sec) , antiderivative size = 409, normalized size of antiderivative = 2.42
method | result | size |
risch | \(-\frac {2 i d c \,a^{2}}{b^{2}}+\frac {2 i d^{2} a^{2} x}{b^{2}}-\frac {i c d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{2}}+\frac {4 i d^{2} a^{3}}{3 b^{3}}+\frac {2 b \,d^{2} x^{2} {\mathrm e}^{2 i \left (x b +a \right )}+4 b c d x \,{\mathrm e}^{2 i \left (x b +a \right )}+2 b \,c^{2} {\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i c d \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x -2 i d c}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )^{2}}+i c^{2} x +\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{2}}{b}-\frac {i d^{2} x^{3}}{3}+\frac {4 c d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {i c^{3}}{3 d}-\frac {4 i d c x a}{b}-\frac {2 c^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}-\frac {2 d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}-i d c \,x^{2}+\frac {c^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}+\frac {2 c d \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{3}}-\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b^{3}}+\frac {2 d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}\) | \(409\) |
-2*I/b^2*d*c*a^2+2*I/b^2*d^2*a^2*x-I/b^2*c*d*polylog(2,-exp(2*I*(b*x+a)))+ 4/3*I/b^3*d^2*a^3+2*(b*d^2*x^2*exp(2*I*(b*x+a))+2*b*c*d*x*exp(2*I*(b*x+a)) +b*c^2*exp(2*I*(b*x+a))-I*d^2*x*exp(2*I*(b*x+a))-I*c*d*exp(2*I*(b*x+a))-I* d^2*x-I*d*c)/b^2/(exp(2*I*(b*x+a))+1)^2+I*c^2*x+1/b*d^2*ln(exp(2*I*(b*x+a) )+1)*x^2-1/3*I*d^2*x^3+4/b^2*c*d*a*ln(exp(I*(b*x+a)))-I/b^2*d^2*polylog(2, -exp(2*I*(b*x+a)))*x+1/3*I/d*c^3-4*I/b*d*c*x*a-2/b*c^2*ln(exp(I*(b*x+a)))- 2/b^3*d^2*a^2*ln(exp(I*(b*x+a)))-I*d*c*x^2+1/b*c^2*ln(exp(2*I*(b*x+a))+1)+ 2/b*c*d*ln(exp(2*I*(b*x+a))+1)*x+1/2*d^2*polylog(3,-exp(2*I*(b*x+a)))/b^3- 1/b^3*d^2*ln(exp(2*I*(b*x+a))+1)+2/b^3*d^2*ln(exp(I*(b*x+a)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 354 vs. \(2 (150) = 300\).
Time = 0.26 (sec) , antiderivative size = 354, normalized size of antiderivative = 2.09 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + d^{2} {\rm polylog}\left (3, \frac {\tan \left (b x + a\right )^{2} + 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + d^{2} {\rm polylog}\left (3, \frac {\tan \left (b x + a\right )^{2} - 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \tan \left (b x + a\right )^{2} - 2 \, {\left (-i \, b d^{2} x - i \, b c d\right )} {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - 2 \, {\left (i \, b d^{2} x + i \, b c d\right )} {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - d^{2}\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - d^{2}\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) - 4 \, {\left (b d^{2} x + b c d\right )} \tan \left (b x + a\right )}{4 \, b^{3}} \]
1/4*(2*b^2*d^2*x^2 + 4*b^2*c*d*x + d^2*polylog(3, (tan(b*x + a)^2 + 2*I*ta n(b*x + a) - 1)/(tan(b*x + a)^2 + 1)) + d^2*polylog(3, (tan(b*x + a)^2 - 2 *I*tan(b*x + a) - 1)/(tan(b*x + a)^2 + 1)) + 2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*tan(b*x + a)^2 - 2*(-I*b*d^2*x - I*b*c*d)*dilog(2*(I*tan(b*x + a) - 1)/(tan(b*x + a)^2 + 1) + 1) - 2*(I*b*d^2*x + I*b*c*d)*dilog(2*(-I*ta n(b*x + a) - 1)/(tan(b*x + a)^2 + 1) + 1) + 2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - d^2)*log(-2*(I*tan(b*x + a) - 1)/(tan(b*x + a)^2 + 1)) + 2*(b^2 *d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - d^2)*log(-2*(-I*tan(b*x + a) - 1)/(tan( b*x + a)^2 + 1)) - 4*(b*d^2*x + b*c*d)*tan(b*x + a))/b^3
\[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\int \left (c + d x\right )^{2} \tan ^{3}{\left (a + b x \right )}\, dx \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1228 vs. \(2 (150) = 300\).
Time = 0.50 (sec) , antiderivative size = 1228, normalized size of antiderivative = 7.27 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\text {Too large to display} \]
-1/2*(c^2*(1/(sin(b*x + a)^2 - 1) - log(sin(b*x + a)^2 - 1)) - 2*a*c*d*(1/ (sin(b*x + a)^2 - 1) - log(sin(b*x + a)^2 - 1))/b + a^2*d^2*(1/(sin(b*x + a)^2 - 1) - log(sin(b*x + a)^2 - 1))/b^2 + 2*(2*(b*x + a)^3*d^2 + 6*(b*c*d - a*d^2)*(b*x + a)^2 + 12*b*c*d - 12*a*d^2 - 6*((b*x + a)^2*d^2 + 2*(b*c* d - a*d^2)*(b*x + a) - d^2 + ((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a ) - d^2)*cos(4*b*x + 4*a) + 2*((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a) - d^2)*cos(2*b*x + 2*a) - (-I*(b*x + a)^2*d^2 + 2*(-I*b*c*d + I*a*d^2)* (b*x + a) + I*d^2)*sin(4*b*x + 4*a) - 2*(-I*(b*x + a)^2*d^2 + 2*(-I*b*c*d + I*a*d^2)*(b*x + a) + I*d^2)*sin(2*b*x + 2*a))*arctan2(sin(2*b*x + 2*a), cos(2*b*x + 2*a) + 1) + 2*((b*x + a)^3*d^2 + 3*(b*c*d - a*d^2)*(b*x + a)^2 - 6*(b*x + a)*d^2)*cos(4*b*x + 4*a) + 4*((b*x + a)^3*d^2 + 3*(b*c*d - (a - I)*d^2)*(b*x + a)^2 + 3*b*c*d - 3*a*d^2 + 3*(2*I*b*c*d + (-2*I*a - 1)*d^ 2)*(b*x + a))*cos(2*b*x + 2*a) + 6*(b*c*d + (b*x + a)*d^2 - a*d^2 + (b*c*d + (b*x + a)*d^2 - a*d^2)*cos(4*b*x + 4*a) + 2*(b*c*d + (b*x + a)*d^2 - a* d^2)*cos(2*b*x + 2*a) + (I*b*c*d + I*(b*x + a)*d^2 - I*a*d^2)*sin(4*b*x + 4*a) + 2*(I*b*c*d + I*(b*x + a)*d^2 - I*a*d^2)*sin(2*b*x + 2*a))*dilog(-e^ (2*I*b*x + 2*I*a)) + 3*(I*(b*x + a)^2*d^2 + 2*(I*b*c*d - I*a*d^2)*(b*x + a ) - I*d^2 + (I*(b*x + a)^2*d^2 + 2*(I*b*c*d - I*a*d^2)*(b*x + a) - I*d^2)* cos(4*b*x + 4*a) + 2*(I*(b*x + a)^2*d^2 + 2*(I*b*c*d - I*a*d^2)*(b*x + a) - I*d^2)*cos(2*b*x + 2*a) - ((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x +...
\[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \tan \left (b x + a\right )^{3} \,d x } \]
Timed out. \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\int {\mathrm {tan}\left (a+b\,x\right )}^3\,{\left (c+d\,x\right )}^2 \,d x \]